package com.tuo51.manager.domain;

import com.tuo51.foudation.model.Domain;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.sql.Timestamp;

/**
 * 系统用户表
 */
@Entity
@Data
@Table(name = "sys_user")
public class SysUser extends Domain implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 登录名
     */
    @Column(name = "login_name", nullable = false)
    private String loginName;

    /**
     * 用户名称
     */
    @Column(name = "user_name", nullable = false)
    private String userName;

    /**
     * 登录密码
     */
    @Column(name = "password", nullable = false)
    private String password;

    /**
     * 软删除标识，Y/N
     */
    @Column(name = "valid", nullable = false)
    private String valid;

    /**
     * 限制允许登录的IP集合
     */
    @Column(name = "limited_ip")
    private String limitedIp;

    /**
     * 账号失效时间，超过时间将不能登录系统
     */
    @Column(name = "expired_time")
    private Timestamp expiredTime;

    /**
     * 最近修改密码时间，超出时间间隔，提示用户修改密码
     */
    @Column(name = "last_change_pwd_time", nullable = false)
    private Timestamp lastChangePwdTime;

    /**
     * 是否允许账号同一个时刻多人在线，Y/N
     */
    @Column(name = "limit_multi_login", nullable = false)
    private String limitMultiLogin;

    /**
     * 修改时间
     */
    @Column(name = "update_time", nullable = false)
    private Date updateTime;
}